import {
	defineStore
} from 'pinia'
import {
	ref
} from 'vue'

export const useStore = defineStore('store', () => {
	// 查找工人传参
	const workerParams = ref({
		lat: "",
		lgt: "",
		plan_begin_at: "",
	});

	// 服务id
	const workIds = ref([]);

	// 工人数组
	const workerItme = ref([]);


	const reset = () => {
		workerParams.value.plan_begin_at = "";
		workerItme.value = [];
	}

	return {
		workerItme,
		workIds,
		workerParams,
		reset
	}
}, {
	persist: true
});